<template>
	<view class="contation">
		<jyf-parser :html="web_content" ref="article"></jyf-parser>
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				title: 'Hello',
				web_content:'',
				id:'',
				type:0
			}
		},
		
		onLoad(e) {
			this.id = e.id
			this.type=e.type
			if(e.type==1){
				uni.setNavigationBarTitle({
					title: '公告详情'
				})
			}
			this.getInfo()
		},
		
		methods: {
			getInfo(){
				let that = this
				that.tui.request(that.type==1?'api.data/notifyDetail':"api.data/businessDetail", "POST", {id:that.id}, false, false, false).then((res) => {
					if(res.code==1){
						that.web_content = res.data.info.content
					}
				}).catch((res) => {
					
				})
			}
		}
	}
</script>

<style lang="scss">
	page{background: #fff;}
	.contation{padding: 20rpx;}
</style>